package com.ruoyi.lm.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.lm.domain.LmUserlevelpackage;
import com.ruoyi.lm.service.ILmUserlevelpackageService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 用户套餐关联Controller
 * 
 * @author ruoyi
 * @date 2020-09-02
 */
@Controller
@RequestMapping("/phone/lm/userlevelpackage")
public class LmUserlevelpackageControllerPhone extends BaseController
{

    @Autowired
    private ILmUserlevelpackageService lmUserlevelpackageService;

    /**
     * 查询用户套餐关联列表
     */
    @PostMapping("/listByUserId")
    @ResponseBody
    public TableDataInfo listByUserId(String userId)
    {
        LmUserlevelpackage lmUserlevelpackage = new LmUserlevelpackage();
        lmUserlevelpackage.setUserId(userId);
        List<LmUserlevelpackage> list = lmUserlevelpackageService.selectLmUserlevelpackageList(lmUserlevelpackage);
        return getDataTable(list);
    }

}
